//
//  CarouselModel.m
//  美食百科
//
//  Created by dllo on 16/1/22.
//  Copyright © 2016年 doll. All rights reserved.
//

#import "CarouselModel.h"

@implementation CarouselModel

- (void)dealloc
{
    [_food_name release];
    [_food_id release];
    [_image_url release];
    [_food_code release];
    [_Id release];
    [_title release];
    [_sub_title release];
    [_page_count release];
    [_content release];

    [super dealloc];
}

-(id)initWithDictionary:(NSDictionary *)dictionary
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dictionary];
    }
    return self;
}
+(CarouselModel *)carouselModelWithDictionary:(NSDictionary *)dictionary
{
    CarouselModel *carouselModel = [[CarouselModel alloc]initWithDictionary:dictionary];
    
    return [carouselModel autorelease];
}
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.content = value;
    }
}
@end
